1. Field
Apparatuses and methods consistent with exemplary embodiments relate to generating and rendering a ray, and more particularly, managing a memory for generating and rendering a ray.
2. Description of the Related Art
A ray tracing method refers to a method of reverse-tracing a route of light along a ray to each pixel in a virtual screen and generating an image in a point of view of a camera.
The ray tracing method generally includes operations of ray generation, acceleration structure traversal, intersection test, and shading. A final color of a ray which is generated in a ray generator is determined through the shading operation after obtaining information on an intersection through the acceleration structure traversal operation and the intersection test operation. According to a medium of the intersection, secondary rays, such as reflection, refraction, or a shadow ray, are derived from a primary ray generated from the ray generator. The ray generator stores the secondary rays in order to perform the acceleration structure traversal operation and following operations with respect to the secondary rays.
However, in case of a plurality of light sources and objects, a space for storing rays may be insufficient at times. In this case, performance of a rendering system may be deteriorated due to memory stalls with respect to the entire rendering system.
Accordingly, there is a need for a method of reducing a load of a memory to enhance performance of the rendering system.